
<%@page import="controller.Utils"%>
<%@page import="java.text.NumberFormat"%>
<%@page import="models.Domain"%>
<%@page import="com.googlecode.objectify.Query"%>
<%
Query<Domain> list = (Query<Domain>) request.getAttribute("list");
String ip = (String) request.getAttribute("ip");
NumberFormat nf = NumberFormat.getInstance();
String title = "Ip "+ip;
String description = "Ip "+ip+" .The website has the same ip "+ip;
String keywords = ip+",ip,related site,infomation site";
%>
<jsp:include page="/layout/header.jsp">
	<jsp:param name="title" value="<%=title %>"/>
	<jsp:param name="description" value="<%=description %>"/>
	<jsp:param name="keywords" value="<%=keywords %>"/>
	<jsp:param name="index" value="true"/>
</jsp:include>


		<section id="content">
        	<div id="content_inner">
            	<div class="rotarapes"></div>                
                <div id="leftSideContent">
                	<div id="ipPage">
                        <div class="simpleBox clearafter">
                            <h3 class="title left"><a href="/i/<%=ip %>">ip : <%=ip %></a></h3>
                            <form method="get" action="/si" class="ipForm right">
                            	<input type="text" name="ip" value="<%=ip!=null?ip:"67.205.109.33" %>" onclick="javascript:this.value = ''"/>
								<button>Infomation Ip</button>
                            </form>
                            <div class="clearbreak"></div>
                            <div class="rotarapes"></div>
                            <h3 class="title">Domain same ip <%=ip %></h3>
                            <%
					String string = "";
					
					string += "<table class='table' cellpadding=\"0\" cellspacing=\"0\">";
					string += "<tr>";
					string += "<th class='text_left'>";
					string += "Domain";
					string += "</th>";
					string += "<th>";
					string += "Speed site";
					string += "</th>";
					string += "<th>";
					string += "Google pagerank";
					string += "</th>";
					string += "<th>";
					string += "Alexa rank";
					string += "</th>";
					string += "</tr>";
					if(list.count()>0)
        		 	{
        		 		for (Domain ar: list) {
							string += "<tr>";
							string += "<td class='text_left'>";
							string += "<a href='/d/"+ar.getDomain()+"'>"+ar.getDomain()+"</a>";
							string += "</td>";
							string += "<td>";
							string += ar.getSpeed()!=null?"<b>"+ar.getSpeed()+"</b>"+" Seconds":"-";
							string += "</td>";
							string += "<td>";
							string += ar.getGooglepr()!=null?ar.getGooglepr():"-";
							string += "</td>";
							string += "<td>";
							string += ar.getAlexa()!=0?nf.format(ar.getAlexa()):"-";
							string += "</td>";
							string += "</tr>";
        		 		}
					}
					string += "</table>";
					out.print(string);
					%>
                            <div class="rotarapes"></div>
                            <div class="ipResultContent">
								<%
								if(list.count()>0)
			        		 	{
			        		 		for (Domain ar: list) {
			        		 			if(ar.getWhoisIp()!=null)
			        		 				out.print(ar.getWhoisIp().getValue());
			        		 			break;
			        		 		}
			        		 	}
								%>

                            </div>
                        </div>                
                    </div>
                </div>
                <aside id="rightSideContent">
                	<div class="simpleBox">
                    	<%@ include file='/adv/left.jsp'%>
                    </div>
                    <div class="simpleBox">
                    	<%@ include file='/adv/left.jsp'%>
                    </div>
                    
                    <div class="simpleBox featuredSite">
                    	<h3 class="title redColor">Featured site</h3>
                        <ul class="featuredSiteListing">
                        	<li><a href="http://web20vn.com/" rel="nofollow" target="_blank"><img src="http://www.as7.org/images/domaintips.png" /></a></li>
							<li><a href="http://www.questiondb.com/" rel="nofollow" target="_blank"><img src="http://www.as7.org/images/faq.png" /></a></li>
                            <li><a href="http://prapi.net/" rel="nofollow" target="_blank"><img src="http://www.as7.org/images/prapi.png" /></a></li>
                            <li><a href="http://www.yooarticles.net/" rel="nofollow" target="_blank"><img src="http://www.as7.org/images/yoo.png" /></a></li>
                        </ul>
                    </div>
                </aside>
                <div class="clearbreak"></div>
            </div>
        </section>

<%@ include file='/layout/footer.jsp'%>		